// The Vue build version to load with the `import` command
// (runtime-only or standalone) has been set in webpack.base.conf with an alias.
import Vue from 'vue'
import App from './App'
import router from './router'
import store from './store'
//import Vuex from 'vuex'
import wx from 'weixin-js-sdk'
import vconsole from 'vconsole'

import xx from './router/globalGuard'

import VueClipboard from 'vue-clipboard2'

import VueLazyload from 'vue-lazyload'

// import Mint from 'mint-ui'
// import 'mint-ui/lib/style.css'

import './assets/global.css'

import YDUI from 'vue-ydui' /* 相当于import YDUI from 'vue-ydui/ydui.rem.js' */
import 'vue-ydui/dist/ydui.rem.css'
/* 使用px：import 'vue-ydui/dist/ydui.px.css'; */

//import http from './util/http'

import { Flexbox, FlexboxItem } from 'vux'


import VueTouch from 'vue-touch'
Vue.use(VueTouch, {name: 'v-touch'})


Vue.component('flexbox', Flexbox)
Vue.component('flexbox-item', FlexboxItem)



//Vue.use(Mint)
//Vue.use(Vuex)
Vue.use(VueClipboard)
Vue.use(YDUI)

Vue.use(VueLazyload, {
  preLoad: 1.3,
  error: require('@/assets/default.jpeg'),   //请求失败后显示的图片
  loading: require('@/assets/default.jpeg'),   //加载的loading过渡图片
  attempt: 1     // 加载图片数量
})

//Vue.prototype.$http = axios

Vue.config.productionTip = false;

const debug = process.env.NODE_ENV !== 'production';

if (document.URL.indexOf('&x=debug') > 0) {
  	var vConsole = new vconsole();
}

// if(!debug){
// 	var vConsole = new vconsole();
// }




/* eslint-disable no-new */
new Vue({
  el: '#app',
  router,
  store,
  components: { App },
  template: '<App/>'
})
